import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import axios from 'axios';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App);


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 使用路由和状态管理器
app.use(router).use(store);

// 使用 Element Plus
app.use(ElementPlus);

axios.defaults.baseURL = 'http://localhost:8082'
// 将 Axios 设置为全局属性
app.config.globalProperties.$axios = axios;

// 挂载应用
app.mount('#app');
